unit unQuoteForm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Forms, Controls,
  Dialogs, unOrderBase, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, cxContainer, cxEdit, dxSkinsCore, dxSkinBlack,
  dxSkinBlue, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
  dxSkinFoggy, dxSkinGlassOceans, dxSkiniMaginary, dxSkinLilian,
  dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins,
  dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
  dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinPumpkin, dxSkinSeven,
  dxSkinSharp, dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
  dxSkinsDefaultPainters, dxSkinValentine, dxSkinXmas2008Blue, DBGridEhGrouping,
  dxSkinsdxBarPainter, dxBar, cxClasses, ActnList, Menus, ADODB, DB, GridsEh,
  DBGridEh, cxGroupBox, CnAAFont, CnAACtrls, StdCtrls, ToolWin, ComCtrls, CommonInterface,
  Mask, DBCtrlsEh, RzButton, ExtCtrls, RzPanel;

type
  TfrmQuote = class(TOrderBase)
    CnAALabel1: TCnAALabel;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    dsSupplier: TDataSource;
    GoodsName: TEdit;
    Edit1: TEdit;
    procedure FormCreate(Sender: TObject);
    procedure DBEditEh1KeyPress(Sender: TObject; var Key: Char);
    procedure GoodsNameKeyPress(Sender: TObject; var Key: Char);
    procedure dbgDetailKeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
    FSupplierSel:IDataSelForm;
    FGoodsSel:IDataSelForm;
  public
    { Public declarations }
  end;

implementation

{$R *.dfm}

procedure TfrmQuote.DBEditEh1KeyPress(Sender: TObject; var Key: Char);
begin
  if Key=#13 then
  begin
  end;
end;

procedure TfrmQuote.dbgDetailKeyPress(Sender: TObject; var Key: Char);
begin
  if Key=#13 then
  begin
    FGoodsSel.ShowDataSelForm('');
  end;
end;

procedure TfrmQuote.FormCreate(Sender: TObject);
begin
  inherited;
  FormID:='ID_QUOTE';
  DetailTable:='Temp_Order_Quote';
  FGoodsSel:=CreateDataSelForm('ID_GOODSSEL',nil);
end;

procedure TfrmQuote.GoodsNameKeyPress(Sender: TObject;
  var Key: Char);
begin
  if Key=#13 then
  begin
    FGoodsSel.ShowDataSelForm('B');
    FGoodsSel.GetDatabyForm(TForm(gbMaster));
  end;
end;

end.
